package com.dyz.leetcode;

public class InvertTree226 {
    //类似镜像二叉树， 后续遍历
    public TreeNode invertTree(TreeNode root) {
        if(root==null){return null;}
        TreeNode left = invertTree(root.left);
        TreeNode right = invertTree(root.right);
        root.left = right;
        root.right = left;
        return root;
    }
}
